local test = ngx.arg[1]
ngx.ctx.buffered = (ngx.ctx.buffered or"") .. test
if ngx.arg[2] and string.find(tostring(ngx.status),"^[1,2,3]") then
    ngx.var.response = ngx.ctx.buffered
    if ngx.req.get_method() ~= "GET" then
        if ngx.req.get_post_args() then
            ngx.var.body = cjson.encode(ngx.req.get_post_args())
        end
        if ngx.req.get_post_args()['params'] then
            ngx.var.body = ngx.req.get_post_args()['params']
        end
    end
end
